﻿using System.Windows.Controls;
using System.Windows.Media;

namespace Ree7.TileToolkit.TileTemplates
{
	/// <summary>
	/// A small tile with an icon and a label
	/// </summary>
	public partial class SmallIconAndLabelTileTemplate : UserControl
	{
		public SmallIconAndLabelTileTemplate()
		{
			InitializeComponent();

            // Default values
            Label = "";
		}

		/// <summary>
		/// You can set any kind of brush as the background (Image, Gradient, SolidColor)
		/// or just do not set the property to leave it transparent (and use the phone theme color)
		/// </summary>
		public new Brush Background
		{
			get
			{
				return LayoutRoot.Background;
			}
			set
			{
				LayoutRoot.Background = value;
			}
		}

		/// <summary>
		/// The icon that stands in the center of the tile, next to the count index
		/// </summary>
		public ImageSource Icon
		{
			get
			{
				return TileIcon.Source;
			}
			set
			{
				TileIcon.Source = value;
			}
		}

		/// <summary>
		/// The label (usually a number) that appears next to the Icon
		/// </summary>
		public string Label
		{
			get
			{
				return TileLabel.Text;
			}
			set
			{
				TileLabel.Text = value;
			}
		}
	}
}
